<template>
	<view class="grade_container auto">
		<image v-if="gardImg"  :src="imgUrl+gardImg" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl: '',
				gardImg:''
			}
		},
		onLoad() {
			this.imgUrl = this.$imgUrl
			this.getUserInfo()
		},
		methods: {
			getUserInfo() {
				let that = this
				var data = {
					openid: uni.getStorageSync('openid'),
				}
				this.$myRequest.post(this.$api.distribution.getGradeImage, data).then(res => {
					if (res.code == '200') {
						this.gardImg = res.data.image
					} else {
						uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.grade_container {
		width: 689rpx;

		image {
			// width: 100%;
			max-width: 100%;
			height: auto;
			display: block;
			margin: auto;
		}
	}
</style>
